import java.util.*;
public class _12102 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n=in.nextInt();
        long t = in.nextLong(); 
        int[] a=new int[n];
        long zong=0;
        for(int i=0;i<n;i++){
            a[i]=in.nextInt();
            zong+=a[i];
        }
        //System.out.println(Arrays.toString(a));
        long m =t%zong;
        System.out.println(m);
        for(int i=0;i<n;i++){
            m-=a[i];
            //System.out.println(m);
            if(m<=0){
                System.out.print((i+1)+" "+(m+a[i]));
                break;
            }
        }
    }
}
